const {
  select
} = require('../../config/mysql.js')
const getList = async (id) => {
  return await select(`SELECT  * FROM category c  WHERE id = ${id}`)
}
const setEnable = async (id, enable) => {
  return await select(`UPDATE category  SET enable = ${enable} WHERE  id = ${id}`)
}
const getListSub = async (id) => {
  return await select(`SELECT  * FROM category c  WHERE pId = ${id}`)
}
module.exports = {
  getList,
  setEnable,
  getListSub
}